package com.wenjiang.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.wenjiang.common.dto.OrderParam;
import com.wenjiang.common.lang.Result;
import com.wenjiang.entity.MallOrder;

import javax.websocket.EncodeException;
import java.io.IOException;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author lwj
 * @since 2021-07-20
 */
public interface MallOrderService extends IService<MallOrder> {


    //创建购物车订单
    public Result createCartOrder(OrderParam orderParam,String userId) throws Exception;


    //获取用户订单
    public Result getUserOrder(Long userId) throws JsonProcessingException;




    //支付订单（普通支付）
    public Result payOrder(Long orderId,Long userId,String[] goodIds) throws IOException, EncodeException;


    public Result ailiPayOrder(Long orderId);



}
